﻿using Grow.EventBus.EventData;
using Grow.Module.Service;

namespace Grow.EventBus.EventHandler
{
    public abstract class EventHandlerBase<TEventData> : IEventHandler<TEventData> where TEventData : IEventData
    {
        protected readonly IServiceContext _serviceContext;

        public EventHandlerBase(IServiceContext serviceContext)
        {
            _serviceContext = serviceContext;
        }

        public abstract Task ExecuteAsync(TEventData eventData, Dictionary<string, string> header, CancellationToken cancellationToken);
    }
}
